public class Main {

    public static void main(String[] args) {
        int[] nums = {1,2,1,3,3,5,5,5,5,5};
        int[] dp = new int[6];
        for(int x:nums){
            dp[x] += x;
        }

    }
}
